Reactive2DList class¶
Attributes: [DefaultMember("Item")] [DebuggerDisplay("Rows = {Count}")]
Defined in
Namespace: ReactiveList.Reactive.Collections Assembly: ReactiveList.Reactive.dll Full name: ReactiveList.Reactive.Collections.Reactive2DList<T> Modifiers: public sealed
Summary¶
View source (opens in a new tab)
Represents a two-dimensional reactive list, where each element is itself a reactive list of items of type T. Provides methods for managing and observing changes to a collection of collections in a reactive manner.
Applies to
net11.0, net10.0, net47, net471, net472, net48, net481
Class hierarchy
classDiagram
class Reactive2DList~T~
class IReactiveList~ReactiveList~T~~ {
<>
}
IReactiveList~ReactiveList~T~~ <|.. Reactive2DList~T~
class IList~ReactiveList~T~~ {
<>
}
IList~ReactiveList~T~~ <|.. Reactive2DList~T~
class ICollection~ReactiveList~T~~ {
<>
}
ICollection~ReactiveList~T~~ <|.. Reactive2DList~T~
class IEnumerable~ReactiveList~T~~ {
<>
}
IEnumerable~ReactiveList~T~~ <|.. Reactive2DList~T~
class IEnumerable {
<>
}
IEnumerable <|.. Reactive2DList~T~
class IList {
<>
}
IList <|.. Reactive2DList~T~
class ICollection {
<>
}
ICollection <|.. Reactive2DList~T~
class IReadOnlyList~ReactiveList~T~~ {
<>
}
IReadOnlyList~ReactiveList~T~~ <|.. Reactive2DList~T~
class IReadOnlyCollection~ReactiveList~T~~ {
<>
}
IReadOnlyCollection~ReactiveList~T~~ <|.. Reactive2DList~T~
class IReactiveSource~ReactiveList~T~~ {
<>
}
IReactiveSource~ReactiveList~T~~ <|.. Reactive2DList~T~
class INotifyCollectionChanged {
<>
}
INotifyCollectionChanged <|.. Reactive2DList~T~
class IDisposable {
<>
}
IDisposable <|.. Reactive2DList~T~
class INotifyPropertyChanged {
<>
}
INotifyPropertyChanged <|.. Reactive2DList~T~
class IReactiveSourceWithOptions {
<>
}
IReactiveSourceWithOptions <|.. Reactive2DList~T~
class IVersionedSnapshotSource~ReactiveList~T~~ {
<>
}
IVersionedSnapshotSource~ReactiveList~T~~ <|.. Reactive2DList~T~
Implements: IReactiveList
Remarks¶
The outer list is a ReactiveList of rows that this type holds and forwards to, so it behaves like that list for every outer operation, including the versioned snapshot and stream that views use to start without missing a change. Disposing it also disposes every row it holds at that moment. Views read Options from this list.
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the Reactive2DList class. |
Properties¶
| Name | Summary |
|---|---|
| Added | Gets the added during the last change as an Observable. |
| Changed | Gets the changed during the last change as an Observable. |
| Count | Gets the number of elements contained in the list. |
| CurrentItems | Gets the current items as an observable that replays the latest snapshot to new subscribers. |
| IsDisposed | Gets a value indicating whether the source has been disposed. |
| IsFixedSize | Gets a value indicating whether the IList (opens in a new tab) has a fixed size. |
| IsReadOnly | Gets a value indicating whether the list is read-only. |
| IsSynchronized | Gets a value indicating whether access to the ICollection (opens in a new tab) is synchronized (thread safe). |
| Options | Gets the options that apply for the lifetime of the source. |
| Items | Gets a read-only observable mirror of the items. |
| ItemsAdded | Gets the items added during the last change. |
| ItemsChanged | Gets the items changed during the last change. |
| ItemsRemoved | Gets the items removed during the last change. |
| Removed | Gets the removed items during the last change as an Observable. |
| Stream | Gets an observable sequence that emits cache change notifications as they occur. |
| SyncRoot | Gets an object that can be used to synchronize access to the ICollection (opens in a new tab). |
| Version | Gets the current version number of the collection, which is incremented on each modification. |
| VersionedStream | Gets an observable of change notifications, each paired with the version the change produced. |
| this[] | Gets or sets the element at the specified index. |
Methods¶
| Name | Summary |
|---|---|
| Add | Adds an item to the ICollection (opens in a new tab). |
| AddRange | Adds the range. |
| AddToInner | Adds the specified items to the inner collection at the given outer index. |
| AsMemory | Gets a read-only memory region over a snapshot of the items. |
| AsSpan | Gets a read-only span over a snapshot of the items. |
| Clear | Removes all items from the ICollection (opens in a new tab). |
| ClearWithoutDeallocation | Clears all items from the list; the internal array capacity is kept for reuse. |
| ClearInner | Removes all elements from the inner collection at the specified outer index. |
| Contains | Determines whether the ICollection (opens in a new tab) contains a specific value. |
| CopyTo | Copies the items to the specified span. |
| CopyVersioned | Copies every item and reports the version of that copy. |
| DeferNotifications | Defers notifications about changes to the rows, not changes inside each row. |
| Dispose | Disposes every row and then the outer list; calling it more than once, or from several threads, is safe. |
| Edit | Executes a batch edit operation on the list. |
| Flatten | Returns a flattened sequence containing all items from each inner collection in the order they appear. |
| GetEnumerator | Returns an enumerator that iterates through the list. |
| GetItem | Retrieves the element at the specified inner index within the list located at the specified outer index. |
| IndexOf | Determines the index of a specific item in the IList (opens in a new tab). |
| Insert | Inserts an item to the IList (opens in a new tab) at the specified index. |
| InsertRange | Inserts the range. |
| Move | Moves an item from one index to another. |
| Remove | Removes the first occurrence of a specific object from the ICollection (opens in a new tab). |
| RemoveAt | Removes the IList (opens in a new tab) item at the specified index. |
| RemoveFromInner | Removes the element at the specified index from the inner collection at the given outer index. |
| RemoveMany | Removes all elements that match the specified predicate from the collection. |
| RemoveRange | Removes the range. |
| ReplaceAll | Replaces all existing items with new items. |
| SetItem | Sets the element at the specified inner index within the inner list at the given outer index. |
| Subscribe | Subscribes the specified observer to the CurrentItems. |
| ToArray | Creates a snapshot of current items as an array. |
| TotalCount | Calculates the total number of items contained in all inner lists. |
| Update | Updates the specified item. |
Events¶
| Name | Summary |
|---|---|
| CollectionChanged | Occurs when the collection changes. |
| PropertyChanged | Occurs when a property value changes. |
Inherited members
System.Object.Equals(System.Object)(opens in a new tab)System.Object.Equals(System.Object,System.Object)(opens in a new tab)System.Object.GetHashCode(opens in a new tab)System.Object.GetType(opens in a new tab)System.Object.MemberwiseClone(opens in a new tab)System.Object.ReferenceEquals(System.Object,System.Object)(opens in a new tab)System.Object.ToString(opens in a new tab)